#ifndef WRR_H_
#define WRR_H_

#include "recbase.h"
#include "rectype.h"
#include "stdffield.h"
#include <string>


namespace opsrc {
    namespace stdf {

        class Wrr : public opsrc::stdf::RecBase
        {
        public:
            Wrr(stdf_rec stdfrec,  int reclen, std::ios::pos_type fileRecFirstBytePosition, int orderindex, endian e, char* buf);
            virtual ~Wrr();

            const StdfField<int> getHeadNum() const;
            void setHeadNum(StdfField<int> headnum);

            const StdfField<int> getSiteGroup() const;
            void setSiteGroup(StdfField<int> sitegrp);

            const StdfField<long> getFinishTime() const;
            void setFinishTime(StdfField<long> finisht);

            const StdfField<long> getPartCount() const;
            void setPartCount(StdfField<long> partcnt);

            const StdfField<long> getRetestCount() const;
            void setRetestCount(StdfField<long> rtstcnt);

            const StdfField<long> getAbortCount() const;
            void setAbortCount(StdfField<long> abrtcnt);

            const StdfField<long> getGoodCount() const;
            void setGoodCount(StdfField<long> goodcnt);

            const StdfField<long> getFunctionalCount() const;
            void setFunctionalCount(StdfField<long> funccnt);

            const StdfField<string> getWaferId() const;
            void setWaferId(StdfField<string> waferid);

            const StdfField<string> getFabWaferId() const;
            void setFabWaferId(StdfField<string> fabwfid);

            const StdfField<string> getFrameId() const;
            void setFrameId(StdfField<string> frameid);

            const StdfField<string> getMaskId() const;
            void setMaskId(StdfField<string> maskid);

            void setUserDescription(StdfField<string> usrdesc);
            const StdfField<string> getUserDescription() const;

            void setExecDescription(StdfField<string> execdesc);
            const StdfField<string> getExecDescription() const;

            void readFields(char *buf);

        protected:
            Wrr();

        private:
            StdfField<int> head_num;
            StdfField<int> site_grp;
            StdfField<long> finish_t;
            StdfField<long> part_cnt;
            StdfField<long> rtst_cnt;
            StdfField<long> abrt_cnt;
            StdfField<long> good_cnt;
            StdfField<long> func_cnt;
            StdfField<string> wafer_id;
            StdfField<string> fabwf_id;
            StdfField<string> frame_id;
            StdfField<string> mask_id;
            StdfField<string> usr_desc;
            StdfField<string> excr_desc;
            endian en;
            bool decodeFields;
        };

    }	 // namespace stdf
}		// namespace opsrc

#endif /*WRR_H_*/
